import Vue from "vue";
import VueRouter, { RouteConfig } from "vue-router";

import Goods from "@/view/goods/Goods.vue";
Vue.use(VueRouter);

const routes: Array<RouteConfig> = [
  {
    path: "/",
    redirect: "/goods",
  },
  {
    path: "/goods",
    component: Goods,
  },
  {
    path: "/business",
    component: () => import("@/view/business/Business.vue"),
  },
  {
    path: "/shop",
    component: () => import("@/view/shop/Shop.vue"),
  },
];

const router = new VueRouter({
  routes,
});

export default router;
